test: standardise mock and setup file and testing related folder names#1209
test: standardise mock and setup file and testing related folder names#1209
Conversation
|
View your CI Pipeline Execution ↗ for commit 574f147
☁️ Nx Cloud last updated this comment at |
@code-pushup/ci
@code-pushup/cli
@code-pushup/core
@code-pushup/create-cli
@code-pushup/models
@code-pushup/nx-plugin
@code-pushup/axe-plugin
@code-pushup/coverage-plugin
@code-pushup/js-packages-plugin
@code-pushup/eslint-plugin
@code-pushup/jsdocs-plugin
@code-pushup/lighthouse-plugin
@code-pushup/typescript-plugin
@code-pushup/utils
commit: |
Code PushUp🤨 Code PushUp report has both improvements and regressions – compared current commit 695b268 with previous commit 5f35b7a. 🕵️ See full comparison in Code PushUp portal 🔍 🏷️ Categories👍 1 group improved, 👎 1 group regressed, 👍 5 audits improved, 👎 2 audits regressed, 14 audits changed without impacting score🗃️ Groups
32 other groups are unchanged. 🛡️ Audits
658 other audits are unchanged. |
777ce08 to
4fb2ca7
Compare
Code PushUp🤨 Code PushUp report has both improvements and regressions – compared current commit 695b268 with previous commit 5f35b7a. 💼 Project
|
| 🏷️ Category | ⭐ Previous score | ⭐ Current score | 🔄 Score change |
|---|---|---|---|
| Code coverage | 🟢 91 | 🟢 92 |
5 other categories are unchanged.
👍 1 group improved, 👍 1 audit improved, 👎 2 audits regressed
🗃️ Groups
| 🔌 Plugin | 🗃️ Group | ⭐ Previous score | ⭐ Current score | 🔄 Score change |
|---|---|---|---|---|
| Code coverage | Code coverage metrics | 🟢 91 | 🟢 92 |
14 other groups are unchanged.
🛡️ Audits
| 🔌 Plugin | 🛡️ Audit | 📏 Previous value | 📏 Current value | 🔄 Value change |
|---|---|---|---|---|
| Code coverage | Branch coverage | 🟨 80.8 % | 🟨 81.7 % | |
| Code coverage | Line coverage | 🟩 93.2 % | 🟩 93 % | |
| Code coverage | Function coverage | 🟩 96.4 % | 🟩 96.3 % |
445 other audits are unchanged.
💼 Project plugin-lighthouse
🤨 Code PushUp report has both improvements and regressions.
🕵️ See full comparison in Code PushUp portal 🔍
All of 6 categories are unchanged.
1 audit changed without impacting score
🗃️ Groups
All of 15 groups are unchanged.
🛡️ Audits
| 🔌 Plugin | 🛡️ Audit | 📏 Previous value | 📏 Current value | 🔄 Value change |
|---|---|---|---|---|
| Code coverage | Branch coverage | 🟩 98.8 % | 🟩 98.8 % |
443 other audits are unchanged.
12 other projects are unchanged.
4fb2ca7 to
cdb82a1
Compare
There was a problem hiding this comment.
Could you split mock folder renaming and setup script refactoring into 2 PR's pls.
I have some more comments on the test setup that would delay the mock renaming part.
Also i already renamed your PR to: "test: standardise mocks folder names" so I can add my feedback related to the renaming here.
cdb82a1 to
ffbe58d
Compare
Done, current PR contains only mocks rename |
ffbe58d to
961e2d8
Compare
BioPhoton
left a comment
There was a problem hiding this comment.
Nice cleanup! I left a suggestion for improvement.
There was a problem hiding this comment.
Thx for the update! This will be a really nice alignment!
One last thing we could do is categorise our file types. (Im not 100% sure about the additional work so feel free to skip it if not super quick.)
e.g. performance.mock.ts contains the MockPerformanceObserver class and perf-hooks.setup-file.ts has the vi.mock call that uses performance.mock.ts exports.
Then test-utils would countain only helper (*.mock.ts or just plain helper functions like setupTestFolder) and test-setup would use them inside *.setup-file.ts files and contain the vi.mock, beforeEach etc.
fa7b6bb to
bbd1d10
Compare
bbd1d10 to
574f147
Compare
Covers #1168
Standardize Folder Naming
Scope: Renamed
mock→mocksfolders for consistencyFiles affected: 8 files across examples and nx-plugin packages
Impact: Pure renaming with corresponding import path updates
Files changed:
examples/plugins/src/lighthouse/mock/→mocks/packages/nx-plugin/mock/→mocks/Updated import references in test files and documentation